package com.jemmyee.pizza.service;

import java.io.Serializable;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IPersonDao;
import com.jemmyee.pizza.entity.Person;
/**
 * @author qiuchao
 * 2010-12-17
 */
@Service("personService")
public class PersonServiceImpl implements IPersonService<Person> {
	@Autowired
	private IPersonDao personDao;
	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#delete(java.lang.Object)
	 */
	public void delete(Person entity) {
		// TODO Auto-generated method stub
		personDao.delete(entity);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#deleteById(java.io.Serializable)
	 */
	public void deleteById(Serializable id) {
		// TODO Auto-generated method stub
		personDao.deleteById(id);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findAll()
	 */
	public List<Person> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findByCriteria(org.hibernate.criterion.DetachedCriteria)
	 */
	public List<Person> findByCriteria(DetachedCriteria criteria) {
		// TODO Auto-generated method stub
		return personDao.findByCriteria(criteria);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findById(java.io.Serializable)
	 */
	public Person findById(Serializable id) {
		// TODO Auto-generated method stub
		return personDao.findById(id);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findByProperty(java.lang.String, java.lang.Object)
	 */
	public List<Person> findByProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return personDao.findByProperty(new Person(), propertyName, value);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findPageByCriteria(org.hibernate.criterion.DetachedCriteria, int, int)
	 */
	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		// TODO Auto-generated method stub
		return personDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#save(java.lang.Object)
	 */
	public void save(Person entity) {
		// TODO Auto-generated method stub
		personDao.save(entity);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#update(java.lang.Object)
	 */
	public void update(Person entity) {
		// TODO Auto-generated method stub
		personDao.update(entity);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#deleteAll(java.util.List)
	 */
	public void deleteAll(List<Person> list) {
		// TODO Auto-generated method stub
		
	}


}
